home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / User's Guide / 10 MacDOS Scripting < prev    next >
Text File  |  1994-09-20  |  3KB  |  89 lines

  1. 10  MacDOS Scripting
  2.        MacDOS  is  AppleScript-able. If you  use  Apple's  standard
  3.        Script  Editor to access MacDOS' dictionary, you will obtain
  4.        the following:
  5.  
  6.  
  7.          Required Suite:
  8.          Events that every application should support
  9.  
  10.          open: Open the specified object(s)
  11.             open  alias  --  list of objects to open
  12.  
  13.          print: Print the specified object(s)
  14.             print  alias  --  list of objects to print
  15.  
  16.          quit: Quit application
  17.             quit
  18.  
  19.           run:  Sent  to  an application when it  is  double-
  20.        clicked
  21.             run
  22.  
  23.          MacDOS Suite:
  24.          Copyright © 1994 Rainbow Hill P/L.
  25.          All rights reserved.
  26.  
  27.          dosExecute: Directs MacDOS to execute a command
  28.               dosExecute   string   --   the  command  to  be
  29.        executed
  30.  
  31.          setVar: Sets a MacDOS global variable
  32.             setVar  string  --  name of the variable
  33.                to  string  --  value to be assigned
  34.  
  35.           getVar:  Obtains  the  value  of  a  MacDOS  global
  36.        variable
  37.             getVar  string  --  name of the variable
  38.             Result:   string  --  the value of the variable
  39.  
  40.  
  41.        open  executes the specified file[s] of type 'TEXT' as batch
  42.           program[s].
  43.  
  44.        print prints the specified file[s] of type 'TEXT'.
  45.  
  46.        quit quits MacDOS.
  47.  
  48.        run launches MacDOS.
  49.  
  50.        dosExecute  parses and executes the parameter as if it  were
  51.           a  command  entered  from  the keyboard.  In  particular,
  52.           dosExecute  followed by the name of a text  file  directs
  53.           MacDOS to execute that file as a batch program.
  54.  
  55.        setVar sets a MacDOS global variable to a given string.
  56.  
  57.        getVar  returns the value of a MacDOS global variable.  This
  58.           is  particularly  useful to access the  variable  DOSERR,
  59.           which  contains  the  error  codes  generated  by  MacDOS
  60.           commands.
  61.  
  62.        MacDOS  only asks for input from the keyboard if the  client
  63.        application allows it (this is always the case  if  you  use
  64.        Apple's Script Editor to write your scripts).
  65.  
  66.        If  the  Apple  Event disallows interaction with  the  user,
  67.        MacDOS follows the following rules:
  68.        •  The  input normally expected from the keyboard is handled
  69.           as  if  the  user  had typed a CNTL-C.  This  causes  the
  70.           current  command to be aborted as soon  as  an  input  is
  71.           required.
  72.        •  Error  reports are always sent to the console  window  as
  73.           strings  of  text regardless of whether ALARM  is  ON  or
  74.           OFF.
  75.        •  The  /D  switch of the PRINT command is ignored  so  that
  76.           the  standard Print dialog is never displayed. Also  when
  77.           requested  to print the console window, MacDOS  does  not
  78.           display the standard Print dialog.
  79.  
  80.        By  setting the global variable SHOWAE to any value, you can
  81.        direct MacDOS to display the class and eventID of all  Apple
  82.        Events  received  (actually, all High  Level  Events).  This
  83.        lets  you check that the originating application is  working
  84.        correctly.
  85.  
  86.        For  debugging  purposes,  MacDOS displays  in  the  console
  87.        window  the  name  of  all  batch files  started  via  Apple
  88.        Events.
  89.